package cn.kinoko.mapper.cnTeam;

import cn.kinoko.model.cnTeam.entity.CnTeam;
import cn.kinoko.model.cnTeam.query.CnTeamQuery;
import cn.kinoko.model.cnTeam.vo.CnTeamPageVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author kinoko
 */
public interface CnTeamMapper extends BaseMapper<CnTeam> {
    /**
     * 分页查询
     *
     * @param page 分页参数
     * @param query 查询参数
     * @return 分页结果
     */
    Page<CnTeamPageVO> queryPage(Page<Object> page, @Param("query") CnTeamQuery query);

    @MapKey("tid")
    List<Map<String, Object>> getJoinTeamMap(Long uid);
}